#include "segmentalgorithm.h"
#include "UiSegmentation.h"

void SegmentAlgorithm::run()
{
    if (!m_param) {
        emit resultReady(false, tr("Illegal Parameters"));
        return;
    }

    QString msg;
    int ret = Algo_Segment(m_param);
    //QThread::sleep(3);
    switch (ret) {
    case 1:
        msg = tr("Success");
        break;
    case 0:
        msg = tr("Failed");
        break;
    }
    emit resultReady(ret, msg);
}
